package com.jiyun.purse.controller;

import com.jiyun.pojo.purse.Sos;
import com.jiyun.purse.service.SosService;
import com.jiyun.result.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/sos")
public class SosController {
    @Autowired
    private SosService sosService;

    @GetMapping("/findSos")
    public Result findSos(Integer userId) {
        return sosService.findSos(userId);
    }

    @PostMapping("/addSos")
    public Result addSos(@RequestBody Sos sos) {
        return sosService.addSos(sos);
    }
}
